import request from '@/config/axios'

export interface ScientificVO {
  id: number
  major: number
  studentNumber: number
  studentName: string
  paperName: string
  scientificInclusion: number
  publicationName: string
  awardDate: string
  remark: string
  status: number
  reason: string
}

// 查询学生科研项目列表
export const getScientificPage = async (params) => {
  return await request.get({ url: `/data/scientific/page`, params })
}

// 查询学生科研项目详情
export const getScientific = async (id: number) => {
  return await request.get({ url: `/data/scientific/get?id=` + id })
}

// 新增学生科研项目
export const createScientific = async (data: ScientificVO) => {
  return await request.post({ url: `/data/scientific/create`, data })
}

// 修改学生科研项目
export const updateScientific = async (data: ScientificVO) => {
  return await request.put({ url: `/data/scientific/update`, data })
}

// 修改学生科研项目
export const updateScientificStatus = async (data: ScientificVO) => {
  return await request.put({ url: `/data/scientific/updateStatus`, data })
}

// 删除学生科研项目
export const deleteScientific = async (id: number) => {
  return await request.delete({ url: `/data/scientific/delete?id=` + id })
}

// 导出学生科研项目 Excel
export const exportScientific = async (params) => {
  return await request.download({ url: `/data/scientific/export-excel`, params })
}
